<%@ page import="java.util.Enumeration" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017-12-02
  Time: 11:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>

        员工界面</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/lib/css/bootstrap-theme.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/lib/css/bootstrap.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/lib/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/lib/css/bootstrap.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/lib/css/font-awesome.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/lib/css/font-awesome.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/lib/css/jquery.toast.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/app/css/myCss.css">
</head>
<body>
<div>
    <h1 class="text-center">学生管理系统</h1>

</div>
<div class="container">
<table border="1px" class="table table-hover table-bordered text-center " >
    <tr class="tr">
        <th>编号</th>
        <th>姓名</th>
        <th>性别</th>
        <th>出生日期</th>
        <th>部门编号</th>
        <th>操作</th>
        <th>操作</th>
    </tr>

    <c:forEach items="${EMPLOYEELIST}" var="emp" varStatus="id">
        <tr class="${emp.id}">
            <td>${id.count}</td>
            <td>${emp.name}</td>
            <td>${emp.gender.text}</td>
            <td>
                <fmt:formatDate value="${emp.birthday}" pattern="yyyy-MM-dd "></fmt:formatDate>
            </td>
            <td>${emp.departmentId}</td>
            <td><a href="${pageContext.request.contextPath}/employ/${emp.id}/update" class="btn1"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a></td>
            <td><a href="${pageContext.request.contextPath}/employ/${emp.id}/delete" id="${emp.id}" class="btn2" ><i class="fa fa-trash" aria-hidden="true"></i></a></td>
        </tr>

    </c:forEach>
    <tr>
        <td colspan="7">
            <a href="${pageContext.request.contextPath}/employ/add" class="btn btn-success">
                <i class="fa fa-plus-square-o" aria-hidden="true"></i>
                添加员工
            </a>
        </td>
    </tr>
</table>
</div>

<%--
<%
    Enumeration<String> e=application.getAttributeNames();
    while(e.hasMoreElements())
    {
        String s=e.nextElement();
        out.print(application.getAttribute(s));
    }
%>--%>

<script src="${pageContext.request.contextPath}/assets/lib/js/jquery3.2.js"></script>
<script src="${pageContext.request.contextPath}/assets/lib/js/jquery.toast.js"></script>
<script src="${pageContext.request.contextPath}/assets/app/js/myJs.js"></script>
<script>
    $(function(){
        <c:if test="${not empty msg}">
        $.toast({
            heading: '提示',
            text: '${msg}',
            showHideTransition: 'slide',
            position: 'top-right',
            icon: 'success'
        })
        </c:if>
    })

</script>
</body>
</html>
